package com.login.service;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import net.sf.json.JSONArray;

import com.login.action.fo.ManageFinaFO;
import com.login.dao.IManagingFinancialDao;
import com.sysmenu.action.IndustryAction;


public class ManagingFinancialServImpl implements IManagingFinancialServ{
	private  IManagingFinancialDao dao;
	public static Logger log = Logger.getLogger(ManagingFinancialServImpl.class);

	public String searchFinaList() {
		List<ManageFinaFO>  list =dao.searchFinaList();
		int total = dao.searchFinaListNum();
		StringBuffer resultMsg = new StringBuffer("{");
		resultMsg.append("\"total\":");
		resultMsg.append(total);
		String menulist = JSONArray.fromObject(list).toString();
		resultMsg.append(",\"rows\":");
		resultMsg.append(menulist);
		resultMsg.append("}");
		log.info("==="+resultMsg.toString());
		return resultMsg.toString();
		 
	}
	
	



	public boolean deleteByIdString(String ids) {
		// TODO Auto-generated method stub
		return dao.deleteByIdString(ids);
		 
	}





	public boolean saveSysmenu(Map<String, Object> paraMap) {
		int num = dao.saveSysmenu(paraMap);
		if(num==0)
		{
		return false;
		}
		else
		{
			return true;
		}
	}





	public void setDao(IManagingFinancialDao dao) {
		this.dao = dao;
	}
	
	
	

}
